TOPO CREATE MERGE Example (of Merge Using Database Query (SELECT))
For each polygon, the script queries the database.
SELECT area_type FROM my_areas WHERE MSLINK=XXX
where XXX is the mslink number corresponding to the actual element. When the area_type of the two adjoining polygons is equal, the polygons are merged. In the example above, the three polygons in the middle have the same area_type so they are merged as shown in the right-hand figure.